package fem2.strategies;

import fem2.Model;
import fem2.enu.MassMatrixType;
import fem2.enu.NewmarkType;

public abstract class NonAdaptiveNewmarkTimeIntegrationStrategy extends
		NewmarkTimeIntegrationStrategy {

	private double stepping;

	public NonAdaptiveNewmarkTimeIntegrationStrategy(Model m, MassMatrixType massType,
			double alpha1, double alpha2, double alphaf, double alpham, double beta, double gamma,
			double t0, double timeStepping, int nt) {
		super(m, massType, alpha1, alpha2, alphaf, alpham, beta, gamma);
		this.t = t0;
		this.stepping = timeStepping;
		this.setNumberOfTimeStep(nt);
	}

	public NonAdaptiveNewmarkTimeIntegrationStrategy(Model m, MassMatrixType massType,
			double alpha1, double alpha2, NewmarkType type, double rhoInf, double t0,
			double timeStepping, int nt) {
		super(m, massType, alpha1, alpha2, type, rhoInf);
		this.t = t0;
		this.stepping = timeStepping;
		this.setNumberOfTimeStep(nt);
	}

	@Override
	public double getNextTimeStep() {
		t += stepping;
		return t;
	}

	@Override
	public double getCurrentTimeStep() {
		return t;
	}

}
